
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>分分钟部署一个Hexo环境 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="config.html" />
    
    
    <link rel="prev" href="../Hexo搭建博客.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../开源组件实现.html">
            
                <a href="../开源组件实现.html">
            
                    
                    开源组件实现
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../mvc/MVC框架实现篇.html">
            
                <a href="../mvc/MVC框架实现篇.html">
            
                    
                    MVC框架实现篇
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1.1" data-path="../mvc/">
            
                <a href="../mvc/">
            
                    
                    MVC框架实现篇
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.2" data-path="../mvc/1.plan.html">
            
                <a href="../mvc/1.plan.html">
            
                    
                    项目规划
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.3" data-path="../mvc/2.route.html">
            
                <a href="../mvc/2.route.html">
            
                    
                    路由设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.4" data-path="../mvc/3.controller.html">
            
                <a href="../mvc/3.controller.html">
            
                    
                    控制器设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.5" data-path="../mvc/4.config.html">
            
                <a href="../mvc/4.config.html">
            
                    
                    配置设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.6" data-path="../mvc/5.view.html">
            
                <a href="../mvc/5.view.html">
            
                    
                    视图设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.7" data-path="../mvc/6.dbutil.html">
            
                <a href="../mvc/6.dbutil.html">
            
                    
                    数据库操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.8" data-path="../mvc/7.crud.html">
            
                <a href="../mvc/7.crud.html">
            
                    
                    增删改查
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../ioc/IOC容器实现篇.html">
            
                <a href="../ioc/IOC容器实现篇.html">
            
                    
                    IOC容器实现篇
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.2.1" data-path="../ioc/1.concept.html">
            
                <a href="../ioc/1.concept.html">
            
                    
                    IOC的概念
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2.2" data-path="../ioc/2.spring.html">
            
                <a href="../ioc/2.spring.html">
            
                    
                    Spring中怎么用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2.3" data-path="../ioc/3.myioc.html">
            
                <a href="../ioc/3.myioc.html">
            
                    
                    设计一个IOC
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2.4" data-path="../ioc/4.principle.html">
            
                <a href="../ioc/4.principle.html">
            
                    
                    原理分析
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../设计模式系列.html">
            
                <a href="../设计模式系列.html">
            
                    
                    设计模式系列
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../designpatterns/singleton.html">
            
                <a href="../designpatterns/singleton.html">
            
                    
                    如何正确地写出单例模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../designpatterns/proxy.html">
            
                <a href="../designpatterns/proxy.html">
            
                    
                    代理模式剖析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../designpatterns/strategy.html">
            
                <a href="../designpatterns/strategy.html">
            
                    
                    什么是策略模式
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../Java8系列.html">
            
                <a href="../Java8系列.html">
            
                    
                    Java8系列
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../java8/java8-guide.html">
            
                <a href="../java8/java8-guide.html">
            
                    
                    Java8简明教程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../java8/foreach.html">
            
                <a href="../java8/foreach.html">
            
                    
                    Java8 Foreach
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../Hexo搭建博客.html">
            
                <a href="../Hexo搭建博客.html">
            
                    
                    Hexo搭建博客
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter active" data-level="1.5.1" data-path="hello.html">
            
                <a href="hello.html">
            
                    
                    分分钟部署一个Hexo环境
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="config.html">
            
                <a href="config.html">
            
                    
                    各种配置详解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="writing.html">
            
                <a href="writing.html">
            
                    
                    开始写作吧
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../开发者指南.html">
            
                <a href="../开发者指南.html">
            
                    
                    开发者指南
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../git/guide.html">
            
                <a href="../git/guide.html">
            
                    
                    git - 简明指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" >
            
                <a target="_blank" href="https://waylau.gitbooks.io/jersey-2-user-guide/content/index.html">
            
                    
                    Jersey-2.x用户指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" >
            
                <a target="_blank" href="https://waylau.gitbooks.io/rest-in-action/content/">
            
                    
                    REST 实战
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" >
            
                <a target="_blank" href="https://github.com/waylau/servlet-3.1-specification">
            
                    
                    Java Servlet 3.1 规范
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" >
            
                <a target="_blank" href="http://mybatis.github.io/mybatis-3/zh/index.html">
            
                    
                    MyBatis中文指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" >
            
                <a target="_blank" href="https://github.com/waylau/apache-shiro-1.2.x-reference">
            
                    
                    Apache Shiro 用户指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7" >
            
                <a target="_blank" href="https://github.com/qibaoguang/Spring-Boot-Reference-Guide/blob/master/SUMMARY.md">
            
                    
                    Spring Boot参考指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.8" >
            
                <a target="_blank" href="https://github.com/waylau/netty-4-user-guide/blob/master/SUMMARY.md">
            
                    
                    Netty4 用户指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.9" data-path="../user_guide/google-java8-guide.html">
            
                <a href="../user_guide/google-java8-guide.html">
            
                    
                    Google Java编程风格指南
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../运维相关.html">
            
                <a href="../运维相关.html">
            
                    
                    运维相关
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../web/test_tool.html">
            
                <a href="../web/test_tool.html">
            
                    
                    Web性能测试工具
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" >
            
                <a target="_blank" href="https://github.com/judasn/Linux-Tutorial">
            
                    
                    Java 程序员眼中的 Linux
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../learn_server/">
            
                <a href="../learn_server/">
            
                    
                    写给java开发的运维笔记
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../经典文章.html">
            
                <a href="../经典文章.html">
            
                    
                    经典文章
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../articles/request_message.html">
            
                <a href="../articles/request_message.html">
            
                    
                    HTTP请求报文解剖
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../articles/software_architecture_patterns.html">
            
                <a href="../articles/software_architecture_patterns.html">
            
                    
                    软件架构模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="../articles/electrical-business-architecture.html">
            
                <a href="../articles/electrical-business-architecture.html">
            
                    
                    电商网站架构案例
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="../服务器相关.html">
            
                <a href="../服务器相关.html">
            
                    
                    服务器/域名/SSL证书
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" >
            
                <a target="_blank" href="https://domainr.com">
            
                    
                    可用域名
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.2" >
            
                <a target="_blank" href="http://hk.hostsir.com/Affiliates/i/d/976">
            
                    
                    优惠域名
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.3" >
            
                <a target="_blank" href="http://www.vultr.com/?ref=6886447">
            
                    
                    vultr VPS
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.4" >
            
                <a target="_blank" href="https://sshdropbear.net/">
            
                    
                    免费VPN/SSH服务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.5" >
            
                <a target="_blank" href="http://get.ishadow.website/">
            
                    
                    免费SS
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.6" >
            
                <span>
            
                    
                    1小时免费VPN
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.7" >
            
                <a target="_blank" href="https://saki.ssl.do/aff.php?aff=11">
            
                    
                    SSL.DO
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.8" >
            
                <a target="_blank" href="http://api.hostinger.com.hk/redir/22018310">
            
                    
                    免费虚拟主机
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="../实用工具.html">
            
                <a href="../实用工具.html">
            
                    
                    实用工具/API
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.1" >
            
                <a target="_blank" href="https://tinypng.com/">
            
                    
                    PNG图片无损压缩
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2" >
            
                <a target="_blank" href="http://tool.c7sky.com/image-watermark/">
            
                    
                    在线给图片加水印
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.3" >
            
                <a target="_blank" href="http://tool.c7sky.com/password/">
            
                    
                    随机密码生成
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.4" >
            
                <a target="_blank" href="https://randomuser.me/">
            
                    
                    随机头像生成
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.5" >
            
                <a target="_blank" href="http://tool.c7sky.com/tcleaner/">
            
                    
                    微博一键清理工具
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.6" >
            
                <a target="_blank" href="http://csscompressor.com/">
            
                    
                    CSS压缩
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.7" >
            
                <a target="_blank" href="http://www.atool.org/">
            
                    
                    在线工具
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >分分钟部署一个Hexo环境</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h2 id="&#x4F7F;&#x7528;hexo&#x642D;&#x5EFA;&#x535A;&#x5BA2;&#x7CFB;&#x5217;">&#x4F7F;&#x7528;hexo&#x642D;&#x5EFA;&#x535A;&#x5BA2;&#x7CFB;&#x5217;</h2>
<h4 id="1-&#x5206;&#x5206;&#x949F;&#x90E8;&#x7F72;&#x4E00;&#x4E2A;hexo&#x73AF;&#x5883;">1. &#x5206;&#x5206;&#x949F;&#x90E8;&#x7F72;&#x4E00;&#x4E2A;Hexo&#x73AF;&#x5883;</h4>
<h4 id="2-&#x4E86;&#x89E3;&#x914D;&#x7F6E;">2. &#x4E86;&#x89E3;&#x914D;&#x7F6E;</h4>
<h2 id="1-&#x5B89;&#x88C5;nodejs">1. &#x5B89;&#x88C5;NodeJS</h2>
<p>&#x6211;&#x7684;&#x7CFB;&#x7EDF;&#x73AF;&#x5883;&#xFF1A;Win7_x64
&#x53BB;Nodejs&#x7684;&#x5B98;&#x7F51;&#x4E0B;&#x8F7D;&#xFF1A;<a href="https://nodejs.org/en/download/" target="_blank">https://nodejs.org/en/download/</a></p>
<p>&#x8FD9;&#x91CC;&#x6211;&#x4E0B;&#x8F7D;&#x7684;&#x662F;</p>
<p><img src="https://i.imgur.com/l1hRF0V.png" alt=""></p>
<p>&#x7136;&#x540E;&#x6309;&#x7167;&#x63D0;&#x793A;&#x4E00;&#x6B65;&#x4E00;&#x6B65;&#x5B89;&#x88C5;&#x5373;&#x53EF;&#xFF0C;&#x6211;&#x88C5;&#x5728;&#x4E86;C&#x76D8;&#xFF0C;&#x8FD9;&#x4E2A;&#x76D8;&#x88C5;&#x4E86;SSD&#x4F1A;&#x5FEB;&#x4E00;&#x4E9B;&#x3002;
NodeJS&#x4F1A;&#x81EA;&#x52A8;&#x5C06;<code>bin</code>&#x5199;&#x5165;&#x73AF;&#x5883;&#x53D8;&#x91CF;&#xFF0C;&#x6765;&#x8BD5;&#x8BD5;&#x662F;&#x5426;&#x5B89;&#x88C5;&#x6210;&#x529F; &#x8F93;&#x5165;<code>node -v</code>&#x547D;&#x4EE4;&#x67E5;&#x770B;nodejs&#x7248;&#x672C;&#x3002;</p>
<p><img src="https://i.imgur.com/Mvxp2C1.png" alt=""></p>
<h2 id="2-&#x914D;&#x7F6E;&#x6DD8;&#x5B9D;-npm-&#x955C;&#x50CF;">2. &#x914D;&#x7F6E;&#x6DD8;&#x5B9D; NPM &#x955C;&#x50CF;</h2>
<p>cnpmjs.org&#x662F;&#x4E00;&#x4E2A;&#x975E;&#x5E38;&#x68D2;&#x7684;npm&#x56FD;&#x5185;&#x955C;&#x50CF;&#x3002;&#x7531;&#x4E8E;&#x5176;&#x4F7F;&#x7528;&#x91CF;&#x8D8A;&#x6765;&#x8D8A;&#x5927;&#xFF0C;&#x52A0;&#x4E0A;&#x6DD8;&#x5B9D;&#x5185;&#x90E8;&#x4E5F;&#x6709;&#x5F88;&#x591A;&#x9879;&#x76EE;&#x4F7F;&#x7528; NodeJS&#xFF0C;&#x4E8E;&#x662F;&#xFF0C;&#x6DD8;&#x5B9D;&#x6B63;&#x5F0F;&#x57FA;&#x4E8E; cnpmjs &#x63A8;&#x51FA;&#x4E86;&#x955C;&#x50CF;&#x670D;&#x52A1;
&#x6DD8;&#x5B9D;&#x7684; NPM &#x955C;&#x50CF;&#x662F;&#x4E00;&#x4E2A;&#x5B8C;&#x6574;&#x7684;npmjs.org&#x955C;&#x50CF;&#x3002;&#x4F60;&#x53EF;&#x4EE5;&#x7528;&#x6B64;&#x4EE3;&#x66FF;&#x5B98;&#x65B9;&#x7248;&#x672C;(&#x53EA;&#x8BFB;)&#xFF0C;&#x540C;&#x6B65;&#x9891;&#x7387;&#x76EE;&#x524D;&#x4E3A; 15&#x5206;&#x949F; &#x4E00;&#x6B21;&#x4EE5;&#x4FDD;&#x8BC1;&#x5C3D;&#x91CF;&#x4E0E;&#x5B98;&#x65B9;&#x670D;&#x52A1;&#x540C;&#x6B65;&#x3002;</p>
<p><img src="https://i.imgur.com/eJFvHTK.png" alt=""></p>
<p>&#x5F53;&#x524D; registry.npm.taobao.org &#x662F;&#x4ECE; registry.npmjs.org &#x8FDB;&#x884C;&#x5168;&#x91CF;&#x540C;&#x6B65;&#x7684;.
&#x5F53;&#x524D; npm.taobao.org &#x8FD0;&#x884C;&#x7248;&#x672C;&#x662F;: cnpmjs.org@0.4.1
&#x7CFB;&#x7EDF;&#x8FD0;&#x884C;&#x5728; Node.js@v0.11.12 &#x4E0A;.</p>
<h3 id="&#x4F7F;&#x7528;&#x8BF4;&#x660E;">&#x4F7F;&#x7528;&#x8BF4;&#x660E;</h3>
<p>&#x4F60;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x6DD8;&#x5B9D;&#x5B9A;&#x5236;&#x7684; <a href="https://github.com/cnpm/cnpm" target="_blank">cnpm</a> (gzip &#x538B;&#x7F29;&#x652F;&#x6301;) &#x547D;&#x4EE4;&#x884C;&#x5DE5;&#x5177;&#x4EE3;&#x66FF;&#x9ED8;&#x8BA4;&#x7684; <code>npm</code>:</p>
<pre><code class="lang-bash">$ npm install -g cnpm --registry=https://registry.npm.taobao.org
</code></pre>
<p>&#x6211;&#x4F7F;&#x7528;&#x7684;&#x5C31;&#x662F;&#x8FD9;&#x4E2A;&#x3002;</p>
<p><img src="https://i.imgur.com/ZIw1Vkr.png" alt=""></p>
<p>&#x6216;&#x8005;&#x4F60;&#x76F4;&#x63A5;&#x901A;&#x8FC7;&#x6DFB;&#x52A0; <code>npm</code> &#x53C2;&#x6570; <code>alias</code> &#x4E00;&#x4E2A;&#x65B0;&#x547D;&#x4EE4;:</p>
<pre><code class="lang-bash"><span class="hljs-built_in">alias</span> cnpm=<span class="hljs-string">&quot;npm --registry=https://registry.npm.taobao.org \
--cache=<span class="hljs-variable">$HOME</span>/.npm/.cache/cnpm \
--disturl=https://npm.taobao.org/dist \
--userconfig=<span class="hljs-variable">$HOME</span>/.cnpmrc&quot;</span>

<span class="hljs-comment"># Or alias it in .bashrc or .zshrc</span>
$ <span class="hljs-built_in">echo</span> <span class="hljs-string">&apos;\n#alias for cnpm\nalias cnpm=&quot;npm --registry=https://registry.npm.taobao.org \
  --cache=$HOME/.npm/.cache/cnpm \
  --disturl=https://npm.taobao.org/dist \
  --userconfig=$HOME/.cnpmrc&quot;&apos;</span> &gt;&gt; ~/.zshrc &amp;&amp; <span class="hljs-built_in">source</span> ~/.zshrc
</code></pre>
<h3 id="&#x5B89;&#x88C5;&#x6A21;&#x5757;">&#x5B89;&#x88C5;&#x6A21;&#x5757;</h3>
<p>&#x4ECE; <a href="http://registry.npm.taobao.org/" target="_blank">registry.npm.taobao.org</a> &#x5B89;&#x88C5;&#x6240;&#x6709;&#x6A21;&#x5757;. &#x5F53;&#x5B89;&#x88C5;&#x7684;&#x65F6;&#x5019;&#x53D1;&#x73B0;&#x5B89;&#x88C5;&#x7684;&#x6A21;&#x5757;&#x8FD8;&#x6CA1;&#x6709;&#x540C;&#x6B65;&#x8FC7;&#x6765;, &#x6DD8;&#x5B9D; NPM &#x4F1A;&#x81EA;&#x52A8;&#x5728;&#x540E;&#x53F0;&#x8FDB;&#x884C;&#x540C;&#x6B65;, &#x5E76;&#x4E14;&#x4F1A;&#x8BA9;&#x4F60;&#x4ECE;&#x5B98;&#x65B9; NPM <a href="http://registry.npmjs.org/" target="_blank">registry.npmjs.org</a> &#x8FDB;&#x884C;&#x5B89;&#x88C5;. &#x4E0B;&#x6B21;&#x4F60;&#x518D;&#x5B89;&#x88C5;&#x8FD9;&#x4E2A;&#x6A21;&#x5757;&#x7684;&#x65F6;&#x5019;, &#x5C31;&#x4F1A;&#x76F4;&#x63A5;&#x4ECE; &#x6DD8;&#x5B9D; NPM &#x5B89;&#x88C5;&#x4E86;.</p>
<pre><code class="lang-bash">$ cnpm install [name]
</code></pre>
<h3 id="&#x540C;&#x6B65;&#x6A21;&#x5757;">&#x540C;&#x6B65;&#x6A21;&#x5757;</h3>
<p>&#x76F4;&#x63A5;&#x901A;&#x8FC7; <code>sync</code> &#x547D;&#x4EE4;&#x9A6C;&#x4E0A;&#x540C;&#x6B65;&#x4E00;&#x4E2A;&#x6A21;&#x5757;, &#x53EA;&#x6709; <code>cnpm</code> &#x547D;&#x4EE4;&#x884C;&#x624D;&#x6709;&#x6B64;&#x529F;&#x80FD;:</p>
<pre><code class="lang-bash">$ cnpm sync connect
</code></pre>
<p>&#x5F53;&#x7136;, &#x4F60;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x901A;&#x8FC7; web &#x65B9;&#x5F0F;&#x6765;&#x540C;&#x6B65;: <a href="http://npm.taobao.org/sync/connect" target="_blank">/sync/connect</a></p>
<pre><code class="lang-bash">$ open https://npm.taobao.org/sync/connect
</code></pre>
<h2 id="3-&#x5B89;&#x88C5;hexo">3. &#x5B89;&#x88C5;hexo</h2>
<p><a href="https://hexo.io/" target="_blank">hexo</a> &#x5B98;&#x7F51;&#x7684;&#x5B89;&#x88C5;&#x8BF4;&#x660E;&#x662F; <code>npm install hexo-cli -g</code></p>
<p>&#x56E0;&#x4E3A;&#x6211;&#x4EEC;&#x5B89;&#x88C5;&#x4E86;&#x6DD8;&#x5B9D;&#x7684;NPM&#xFF0C;&#x6240;&#x4EE5;&#x9700;&#x8981;&#x4F7F;&#x7528; <code>cnpm</code> &#x547D;&#x4EE4;</p>
<p><img src="https://i.imgur.com/yPkpF4O.png" alt=""></p>
<p>&#x8FD9;&#x6837;&#x5C31;&#x5B89;&#x88C5;&#x6210;&#x529F;&#x4E86;&#xFF01;</p>
<h2 id="4-helloworld">4. HelloWorld</h2>
<p>&#x6309;&#x7167;&#x5B98;&#x65B9;&#x6559;&#x7A0B;(&#x6CE8;&#x610F;&#x4F7F;&#x7528; <code>cnpm</code> &#x54E6;)&#xFF1A;</p>
<pre><code class="lang-bash">$ hexo init blog
$ <span class="hljs-built_in">cd</span> blog
$ cnpm install
$ hexo server
</code></pre>
<p>&#x8FD9;&#x6837;&#x5C31;&#x53EF;&#x4EE5;&#x8FD0;&#x884C;&#x4E00;&#x4E2A;&#x6700;&#x7B80;&#x5355;&#x7684;&#x535A;&#x5BA2;&#x7A0B;&#x5E8F;&#x4E86;~</p>
<p>&#x4E0B;&#x4E00;&#x8282;&#xFF1A;<a href="config.html">&#x5404;&#x79CD;&#x914D;&#x7F6E;&#x8BE6;&#x89E3;</a></p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="../Hexo搭建博客.html" class="navigation navigation-prev " aria-label="Previous page: Hexo搭建博客">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="config.html" class="navigation navigation-next " aria-label="Next page: 各种配置详解">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"分分钟部署一个Hexo环境","level":"1.5.1","depth":2,"next":{"title":"各种配置详解","level":"1.5.2","depth":2,"path":"hexo/config.md","ref":"hexo/config.md","articles":[]},"previous":{"title":"Hexo搭建博客","level":"1.5","depth":1,"path":"Hexo搭建博客.md","ref":"Hexo搭建博客.md","articles":[{"title":"分分钟部署一个Hexo环境","level":"1.5.1","depth":2,"path":"hexo/hello.md","ref":"hexo/hello.md","articles":[]},{"title":"各种配置详解","level":"1.5.2","depth":2,"path":"hexo/config.md","ref":"hexo/config.md","articles":[]},{"title":"开始写作吧","level":"1.5.3","depth":2,"path":"hexo/writing.md","ref":"hexo/writing.md","articles":[]}]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"hexo/hello.md","mtime":"2017-09-01T15:31:07.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2017-09-01T16:57:38.335Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

